let express = require("express")
let db = require("./db")
let ui_router = require("./router/ui_router")
let business_router = require("./router/business_router")
let app = express()

db.then(() => {
    // app.use(express.static("public"))
    app.use(express.urlencoded({extended: true}))
    app.use(ui_router)
    app.use(business_router)
}).catch((err) => {

})

app.listen(3000, (err) => {
    if(!err){
        console.log("服务器启动成功了")
    }else{
        console.log(err)
    }
})